﻿using System;
using System.Collections.Generic;
using System.Net;
using System.Text;

namespace Syspetro.Core.ErrorException
{
    public class ExceptionUnauthorized: Exception, IErrorException
    {
        readonly string Msg = null;
        public ExceptionUnauthorized()
        {

        }
        public ExceptionUnauthorized(string msg)
        {
            Msg = msg;
        }

        public bool IsDetails { get => false; }

        public HttpStatusCode Code() => HttpStatusCode.Unauthorized;
        public new string Message() => string.IsNullOrEmpty(Msg) ? "未授权" : Msg;
    }
}
